<template>
  <div class="container">
    <CptHeader></CptHeader>
    <div class=" base-viewer">
      <slot />
    </div>
    <p v-if="!isInChatPage" class="p-10 text-center">
      Copyright © 2024.河南省农墨网络科技有限公司 All rights reserved. <a href="https://beian.miit.gov.cn/"
        target="blank">豫ICP备2021003631号-2</a>
    </p>

    

  </div>
</template>

<script setup lang="ts">
import CptHeader from '~/components/CptHeader.vue';

const { signIn, token, data: userInfo, status, lastRefreshedAt, signOut, getSession } = useAuth()
const { rawToken } = useAuthState()
import { refreshUserPersonInfo } from "~/service/yapi";
let refreshUserInfo = async () => {
  let newToken = await refreshUserPersonInfo({})
  rawToken.value = newToken
}
let handleSignOut = () => {
  signOut({ callbackUrl: '/' }).then(res => {

  }).catch(err => {
    ElMessage.warning('操作失败，请重试')

  })
}


// 获取当前路由
const route = useRoute();

// 计算是否在聊天页面
const isInChatPage = computed(() => {
  return route.path.startsWith('/chat');
});

</script>

<style scoped></style>
